#!/bin/sh

for order in $*; do
   if [ ${order} = "-n" ]; then
      echo "=============== ndk-build -C =============="
      ndk-build -C .
   elif [ ${order} = "-a" ]; then
      echo "=============== ant debug =============="
      ant debug
   elif [ ${order} = "-u" ]; then
      echo "=============== android update project -p . =============="
      android update project --target 5 -p .
   elif [ ${order} = "-i" ]; then
      echo "=============== adb install -r ./bin/NativeActivity-debug.apk =============="
      adb install -r ./bin/NativeActivity-debug.apk
   elif [ ${order} = "-all" ]; then
      echo "=============== full build =============="
      ndk-build -C .
      android update project -p .
      ant debug
      adb install -r ./bin/NativeActivity-debug.apk
   fi
done
